<%@ page import="jakarta.servlet.http.Cookie" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/7/26
  Time: 18:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>addCookies</title>
</head>
<body>
    <%
        //服务端
        Cookie cookie1 = new Cookie("name","Yu");
        Cookie cookie2 = new Cookie("pwd","123456");
        response.addCookie(cookie1);
        response.addCookie(cookie2);
        response.sendRedirect("getCookies.jsp");
    %>
</body>
</html>
